import request from '@/utils/request';

/**
 * 编辑分类
 */
export async function editClassify(data) {
  const res = await request.post('/Classify/editClassify', data);
  if (res.data.code === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.message));
}

// 头部统计
export async function rechargeStatistics(data) {
  const res = await request.post('/home/rechargeStatistics ', data);
  if (res.data.code === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.message));
}

// 营收记录
export async function amountLog(data) {
  const res = await request.post('/order/amountLog', data);
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
// 营收记录详情
export async function amountLogInfo(data) {
  const res = await request.post('/order/amountLogInfo', data);
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
